home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 139 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.5 KB  |  33 lines

  1. Path: gabi-soft.fr!not-for-mail
  2. From: kanze@gabi-soft.fr (J. Kanze)
  3. Newsgroups: comp.std.c
  4. Subject: Re: ... char * * promotion to char const * const * ...
  5. Date: 18 Jan 1996 17:15:33 +0100
  6. Organization: GABI Software, Sarl.
  7. Message-ID: <4dlrn5$81e@gabi.gabi-soft.fr>
  8. References: <4dgj8q$qin@unix.sri.com> <KANZE.96Jan17121659@slsvewt.lts.sel.alcatel.de> <DLBzGB.J60@polo.demon.co.uk>
  9. NNTP-Posting-Host: gabi.gabi-soft.fr
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. John Winters (john@polo.demon.co.uk) wrote:
  13. |> In article <KANZE.96Jan17121659@slsvewt.lts.sel.alcatel.de>,
  14. |> James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
  15. |> [snip]
  16. |> >
  17. |> >Originally, the C standard was going to allow this; in fact, it was
  18. |> >going to allow all casts which added const anywhere in the type.  Then
  19. |> >someone pointed out that the conversion 'char ** -> char *const *' was
  20. |> >unsafe.  As a result, the wording was changed to only allow adding the
  21. |> >const at the top level.
  22.  
  23. |> Interesting.  Could you enlighten us (well, me anyway) as to *why* it
  24. |> is unsafe.  I don't find it immediately obvious.
  25.  
  26. As another poster has already pointed out, I gave the wrong conversion
  27. as unsafe.  (That's what comes of typing faster than you think.)
  28. -- 
  29. James Kanze           (+33) 88 14 49 00          email: kanze@gabi-soft.fr
  30. GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
  31. Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
  32.               -- A la recherche d'une activitΘ dans une region francophone
  33.